<?php
/**
 * 资产包尽调——团队收益分配（编辑）.
 * User: zhao shou qiang
 * Date: 2018/1/11 0011
 * Time: 17:33
 */
?>
<form name="initation_group_income_form">
    <table class="table donot-edit tdEdit">
        <thead>
        <tr>
            <th class="text-left">阶段</th>
            <th class="text-left">成员及分配比例</th>
            <th class="text-left"></th>
        </tr>
        </thead>
        <tbody class="maintenance-tbody">

        <?php
        if (!empty($list) && is_array($list)) {
            foreach ($list as $model) {
                echo '<tr data-id="' . $model['id'] . '">
                    <input type="hidden" name="PackageInitiationIncome[id][]" value="' . $model['id'] . '"/>
                    <td><input type="text" name="PackageInitiationIncome[stage][]" value="' . $model['stage'] . '" ></td>
                    <td><input type="text" name="PackageInitiationIncome[profit][]" value="' . $model['profit'] . '" ></td>
                    <td class="btn-addpop-td pr20" data-toggle="modal" data-target="#myModalDelete">
                        <button type="button" class="btn pull-right btn-pop btn-addpop btn_delete" data-id="' . $model['id'] . '" data-url="' . \yii\helpers\Url::toRoute('package-initation-income/delete', true) . '">
                            删除
                        </button>
                    </td>
                </tr>';
            }
        } else {
            echo '<tr data-id="">
                    <input type="hidden" name="PackageInitiationIncome[id][]" value=""/>
                    <td><input type="text" name="PackageInitiationIncome[stage][]" placeholder="请输入阶段" value=""></td>
                    <td><input type="text" name="PackageInitiationIncome[profit][]" placeholder="请输入成员及分配比例" value=""></td>
                    <td class="btn-addpop-td pr20">
                        <button type="button" class="btn pull-right btn-pop btn-addpop btn_delete" data-id="" data-url="" >
                            删除
                        </button>
                    </td>
                </tr>';
        }
        ?>
        </tbody>
    </table>
</form>

<!--data-toggle="modal" data-target="#myModalDelete"-->

<div class="warning col-md-12">
    <img src="/image/officeHall/uploadAssetPackage/add.png" class="pull-left initation_group_income_add">
    <span class="pull-left">继续添加</span>
</div>

<!-- 结束按钮 -->
<form class="form-horizontal col-md-12 form-bootom">
    <div class=" btns">
        <button type="button"
                class="maintenance-btn-sav btn btn-primary btns-primary-save pull-right btns-primary maintenance-btn initation_saves_group_income">
            保存
        </button>
        <button type="button"
                class="maintenance-btn-del btn btn-default btns-primary-del pull-right btns-primary maintenance-btn initation_cancel_group_income">
            取消
        </button>
        <p data-toggle="modal" data-target="#myModalDelete" id="initation_income_modal" style="display: none;"></p>
    </div>
</form>
</div>

